﻿using Geek.Server.Core.Actors;
using Geek.Server.Core.Net.Http;

namespace Server.Logic.WebServer
{
    [HttpMsgMapping(WebAuthReq.RouteKey)]
    public class WebAuthReqHandler : BaseHttpHandler<WebAuthReq>
    {
        protected override async Task<HttpResponse> Execute(string ip, WebAuthReq req)
        {
            // TODO sdk 鉴权
            
            var compAgent = await ActorMgr.GetCompAgent<WebServerCompAgent>();
            return await compAgent.RequestCreateLoginToken(req.SDKUid, req.SDKType);
        }
    }
}